#pragma strict

function Start () {

}

function Update () {
	if (Input.GetButton("Enter")) {
		ReturnToMenu();
	}
}

function OnGUI() {
	/*GUILayout.BeginArea(Rect(0,0,Screen.width, Screen.height));
		GUILayout.BeginVertical("box");
			if (GUILayout.Button("Back")) {
				Application.LoadLevel("MenuScene");
			}
		GUILayout.EndVertical();
	GUILayout.EndArea();*/
}

function ReturnToMenu() {
	if (CustomLevelManager.Instance().IsPlayingCustom()) {
		Application.LoadLevel("CustomLevelScene");
	}
	else {
		Application.LoadLevel("MenuScene");
	}
}